< previous page page_910 next page >

Page 910
Listing A.36. continued
        Case Is = dbInteger
            FieldTypeName = "INTEGER"
        Case Is = dbLong
            FieldTypeName = "LONG"
        Case Is = dbCurrency
            FieldTypeName = "CURRENCY"
        Case Is = dbSingle
            FieldTypeName = "SINGLE"
        Case Is = dbDouble
            FieldTypeName = "DOUBLE"
        Case Is = dbByte
            FieldTypeName = "BYTE"
        Case Is = dbLongBinary
            FieldTypeName = "LONGBINARY"
        Case Else
            FieldTypeName = "UNKNOWN"
    End Select
    '
    If fldObject.Attributes And dbAutoIncrField Then
        FieldTypeName = "COUNTER"
    End If

End Function
The WrCreateIndex Method
Now that all the field work is done, it's time to build the indexes. Listing A.37 shows the code for the WrCreateIndex method.
Type.gifListing A.37. Coding the WrCreateIndex function.
Public Function WrCreateIndex(idxObject As Index, cTable As String) As String
    '
    ' create index code line
    '
    Dim cTemp As String
    Dim cIndex As String
    Dim fldObject As Field
    '
    ' ignore system table indexes
    If UCase(Left(cTable, 4)) = "MSYS" Then
        WrCreateIndex = ""
        Exit Function
    End If
    '
    If InStr(cTable, " ") <> 0 And Left(cTable, 1) <> "[" Then
        cTable = "[" + cTable + "]"
    End If

 
< previous page page_910 next page >

If you like this book, buy it!